﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsFormsApplication2
{
    class Grade
    {
        private double chineseGrade;
        private double mathGrade;
        private double englishGrade;

        public void SetChineseGrade(double chineseGrade)
        {
            this.chineseGrade = chineseGrade;
        }

        public void SetMathGrade(double mathGrade)
        {
            this.mathGrade = mathGrade;
        }

        public void SetEnglishGrade(double englishGrade)
        {
            this.englishGrade = englishGrade;
        }

        public String Display()
        {
            return "语文：" + chineseGrade + ",数学：" + mathGrade + ",英语：" + englishGrade;
        }

        public double AverageGrade()
        {
            return (chineseGrade + mathGrade + englishGrade) / 3;
        }

    }
}
